package org.csmzxy.class2334.stringclass;

public class Example06 {
    public static void main(String[] args){
        String s = "hello world";
        System.out.println("将字符串" + s + "中的world替换成everyone,结果为" + s.replace("world","everyone"));
        System.out.println("去除字符串" + s +"两端的空格，结果为" + s.trim());
        System.out.println("去除字符串" + s +"中的所有空格，结果为" + s.replace(" ",""));
    }
}
